#!/bin/bash

# ----------------------------------------------------------------------
# Filename:   75639-id.sh
# Version:    1.0
# Date:       2013/12/18
# Author:     yuanhui.shi
# Email:      yuanhui.shi@cs2c.com.cn
# Summary:    03系统安全功能-01SELinux-03SELinux重要命令-03SELinux安全上下文标签相关命令-03id
# Notes:      安全上下文标签 id
# Copyright:  China Standard Software Co., Ltd.
# History：     
#             Version 1.0, 2013/12/18
#             -   The first one
# ----------------------------------------------------------------------

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH

source ../../lib/Echo.sh
source ../../lib/XmlParse.sh
source ./lib/Selib.sh

function CleanData ()
{
  EchoInfo "75639-id.sh执行完毕"
}

trap "CleanData" EXIT
CheckSElinuxStatus

EchoInfo "id -Z///id --context：均只显示当前用户的安全上下文"
[ "`id |cut -d "=" -f5`" == "`id -Z`" ] && [ "`id |cut -d "=" -f5`" == "`id --context`" ]
EchoResult "id -Z与id --context命令执行结果正确"

